package shiyaner;
import java.util.Arrays;
import java.util.Scanner;
public class Person {
    private int sno;
    private String name;
    private int score;
    public Person(int sno,String name,int score){
    	this.setName(name);
    	this.setSno(sno);
    	this.setScore(score);
    }
    public String toString(){
		return "编号:"+this.sno+" 姓名:"+this.name+" 得分:"+this.score;
	}
	public int compareTo(Person o){
		if(this.score>o.score){
			return -1;
		}else if(this.score<o.score){
			return 1;
		}else{
			return 0;
		}
	}
	public String getName(){
		return name;
	}
	public void setName(String n){
		name=n;
	}
	public int getSno(){
		return sno;
	}
    public void setSno(int n){
    	sno=n;
    }
    public int getScore(){
    	return score;
    }
    public void setScore(int n){
    	score=n;
    }
}
